<template>
	<view class="step2">
		<!-- 定制班车第二页 -->
		<picker mode="date" :value="date" @change="changeDate">
			<view>
				点击选择日期：
				<text>{{this.date}}</text>
			</view>
		</picker>
		
		<button
		type="primary"
		:disabled="date!=''? false:true"
		@click="goStep3"
		>下 一 步</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				start:"",
				end:"",
				price:"",
				path:"",
				
				date:""
			};
		},
		onLoad(e) {
			this.start=e.start
			this.end=e.end
			this.price=e.price
			this.path=e.path
		},
		methods:{
			// 选择日期
			changeDate(e){
				this.date=e.detail.value
			},
			// 跳转到step3页
			goStep3(){
				uni.navigateTo({
					url:
					`/pages/bus_query/step3?start=${this.start}&end=${this.end}&price=${this.price}&path=${this.path}&date=${this.date}`
				})
			}
		}
	}
</script>

<style lang="scss">
.step2{
	padding: 40rpx;
	picker{
		text{
			font-weight: bold;
			font-size: 48rpx;
		}
	}
	button{
		margin-top: 40rpx;
		border-radius: 20rpx;
	}
	button::after{
		border: 0;
	}
}
</style>
